﻿@using EasyUIMvc
@using EasyUIMvc.Samples.App_Start
@using EasyUIMvc.Tree

@{
    ViewBag.Title = "TreeGrid";
}

<h2>TreeGrid</h2>
@Html.EasyUI().TreeGrid(settings =>
                        {
                            settings.Title = "Tree grid example";
                            settings.Id = "TreeGrid";
                            settings.Style = "width:700px;height:250px";
                            settings.DataOption = new TreeGridDataOption
                            {
                                AutoFitComlumn = false,
                                FieldID = "id",
                                Method = "get",
                                ShowRowNumber = true,
                                TreeField = "name",
                                UrlJsonDataSource = "../treegrid_data1.json",
                                TreeColumnName = new[] { "name", "size", "date" }, 
                                TreeColumnText = new[] {"Tên mục", "Kích thước", "Ngày thay đổi"},
                                TreeColumnWidth = new short[] { 220, 100, 150 }, 
                                TreeColumnTextAlign = new[]
                                                      {
                                                          EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Default),
                                                          EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Right),
                                                          EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Default),
                                                      }
                            };
                      }).GetHtml()